$ psql psql (13.1) Type "help" for help. postgres=# SELECT * FROM pg_config; name | setting -------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ BINDIR | /usr/local/pgsql/bin DOCDIR | /usr/local/pgsql/share/doc HTMLDIR | /usr/local/pgsql/share/doc INCLUDEDIR | /usr/local/pgsql/include PKGINCLUDEDIR | /usr/local/pgsql/include INCLUDEDIR-SERVER | /usr/local/pgsql/include/server LIBDIR | /usr/local/pgsql/lib PKGLIBDIR | /usr/local/pgsql/lib LOCALEDIR | /usr/local/pgsql/share/locale MANDIR | /usr/local/pgsql/share/man SHAREDIR | /usr/local/pgsql/share SYSCONFDIR | /usr/local/pgsql/etc PGXS | /usr/local/pgsql/lib/pgxs/src/makefiles/pgxs.mk CONFIGURE | '--enable-depend' '--enable-debug' '--enable-cassert' '--with-llvm' CC | gcc -std=gnu99 CPPFLAGS | -D_GNU_SOURCE CFLAGS | -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -g -O2 CFLAGS_SL | -fPIC LDFLAGS | -L/usr/local/lib -Wl,--as-needed -Wl,-rpath,'/usr/local/pgsql/lib',--enable-new-dtags LDFLAGS_EX | LDFLAGS_SL | LIBS | -lpgcommon -lpgport -lpthread -lz -lreadline -lrt -ldl -lm VERSION | PostgreSQL 13.1 (23 rows) postgres=# SELECT version(); version --------------------------------------------------------------------------------------------------------- PostgreSQL 13.1 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-39), 64-bit (1 row) postgres=# CREATE USER demo PASSWORD 'demo'; CREATE ROLE postgres=# \connect postgres demo You are now connected to database "postgres" as user "demo". ## Session#1 postgres=> CREATE TABLE data1(c1 NUMERIC, c2 VARCHAR(10)); CREATE TABLE postgres=> INSERT INTO data1 VALUES (generate_series(1, 1000000), 'data1'); INSERT 0 1000000 postgres=> ANALYZE data1; ANALYZE postgres=> SET jit=on; SET postgres=> SET force_parallel_mode = on; SET postgres=> EXPLAIN SELECT * FROM data1 d1, data1 d2; QUERY PLAN ------------------------------------------------------------------------------------- Gather (cost=1000.00..117383034312.00 rows=1000000000000 width=24) Workers Planned: 1 Single Copy: true -> Nested Loop (cost=0.00..17383033312.00 rows=1000000000000 width=24) -> Seq Scan on data1 d1 (cost=0.00..15406.00 rows=1000000 width=12) -> Materialize (cost=0.00..25289.00 rows=1000000 width=12) -> Seq Scan on data1 d2 (cost=0.00..15406.00 rows=1000000 width=12) JIT: Functions: 3 Options: Inlining true, Optimization true, Expressions true, Deforming true (10 rows) postgres=> EXPLAIN ANALYZE SELECT * FROM data1 d1, data1 d2; WARNING: terminating connection because of crash of another server process DETAIL: The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory. HINT: In a moment you should be able to reconnect to the database and repeat your command. ERROR: canceling statement due to user request server closed the connection unexpectedly This probably means the server terminated abnormally before or while processing the request. The connection to the server was lost. Attempting reset: Failed. !?> ## Session#2 $ psql psql (13.1) Type "help" for help. postgres=# SELECT pid, leader_pid, query FROM pg_stat_activity WHERE usename='demo'; pid | leader_pid | query --------+------------+---------------------------------------------------- 125215 | 125205 | EXPLAIN ANALYZE SELECT * FROM data1 d1, data1 d2; 125205 | | EXPLAIN ANALYZE SELECT * FROM data1 d1, data1 d2; (2 rows) postgres=# SELECT pg_cancel_backend(125205); pg_cancel_backend ------------------- t (1 row) postgres=# $ cat postgresql-2020-12-06_174206.log 2020-12-06 17:42:06.965 JST [125194] LOG: starting PostgreSQL 13.1 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-39), 64-bit 2020-12-06 17:42:06.967 JST [125194] LOG: listening on IPv6 address "::1", port 5432 2020-12-06 17:42:06.967 JST [125194] LOG: listening on IPv4 address "127.0.0.1", port 5432 2020-12-06 17:42:06.968 JST [125194] LOG: listening on Unix socket "/tmp/.s.PGSQL.5432" 2020-12-06 17:42:06.969 JST [125196] LOG: database system was shut down at 2020-12-06 17:41:35 JST 2020-12-06 17:42:06.970 JST [125194] LOG: database system is ready to accept connections 2020-12-06 17:43:46.923 JST [125205] ERROR: canceling statement due to user request 2020-12-06 17:43:46.923 JST [125205] STATEMENT: EXPLAIN ANALYZE SELECT * FROM data1 d1, data1 d2; 2020-12-06 17:43:46.923 JST [125215] FATAL: terminating connection due to administrator command 2020-12-06 17:43:46.923 JST [125215] STATEMENT: EXPLAIN ANALYZE SELECT * FROM data1 d1, data1 d2; 2020-12-06 17:43:46.931 JST [125194] LOG: background worker "parallel worker" (PID 125215) exited with exit code 1 2020-12-06 17:43:51.971 JST [125205] ERROR: canceling statement due to user request 2020-12-06 17:43:51.971 JST [125205] STATEMENT: EXPLAIN ANALYZE SELECT * FROM data1 d1, data1 d2; 2020-12-06 17:43:51.971 JST [125301] FATAL: terminating connection due to administrator command 2020-12-06 17:43:51.971 JST [125301] STATEMENT: EXPLAIN ANALYZE SELECT * FROM data1 d1, data1 d2; 2020-12-06 17:43:52.176 JST [125194] LOG: background worker "parallel worker" (PID 125301) was terminated by signal 11: Segmentation fault 2020-12-06 17:43:52.176 JST [125194] DETAIL: Failed process was running: EXPLAIN ANALYZE SELECT * FROM data1 d1, data1 d2; 2020-12-06 17:43:52.176 JST [125194] LOG: terminating any other active server processes 2020-12-06 17:43:52.176 JST [125300] WARNING: terminating connection because of crash of another server process 2020-12-06 17:43:52.176 JST [125300] DETAIL: The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory. 2020-12-06 17:43:52.176 JST [125300] HINT: In a moment you should be able to reconnect to the database and repeat your command. 2020-12-06 17:43:52.176 JST [125205] WARNING: terminating connection because of crash of another server process 2020-12-06 17:43:52.176 JST [125205] DETAIL: The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory. 2020-12-06 17:43:52.176 JST [125205] HINT: In a moment you should be able to reconnect to the database and repeat your command. 2020-12-06 17:43:52.179 JST [125200] WARNING: terminating connection because of crash of another server process 2020-12-06 17:43:52.179 JST [125200] DETAIL: The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory. 2020-12-06 17:43:52.179 JST [125200] HINT: In a moment you should be able to reconnect to the database and repeat your command. 2020-12-06 17:43:52.180 JST [125194] LOG: all server processes terminated; reinitializing 2020-12-06 17:43:52.193 JST [125313] LOG: database system was interrupted; last known up at 2020-12-06 17:42:06 JST 2020-12-06 17:43:52.195 JST [125314] FATAL: the database system is in recovery mode 2020-12-06 17:43:52.212 JST [125313] LOG: database system was not properly shut down; automatic recovery in progress 2020-12-06 17:43:52.212 JST [125313] LOG: redo starts at 0/15C07D0 2020-12-06 17:43:52.616 JST [125313] LOG: invalid record length at 0/5B10A90: wanted 24, got 0 2020-12-06 17:43:52.616 JST [125313] LOG: redo done at 0/5B10A58 2020-12-06 17:43:52.671 JST [125194] LOG: database system is ready to accept connections $